package com.chenfeng.wiki.controller;
import com.chenfeng.wiki.domain.Demo;
import com.chenfeng.wiki.domain.Ebook;
import com.chenfeng.wiki.service.DemoService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import  org.springframework.web.bind.annotation.RequestMapping;
import  org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RequestMapping("/demo")
@RestController
public class democontroller {

    @Resource
    private DemoService demoService;
    @GetMapping("/list1")
    public List<Ebook> list(){
        return demoService.list();
    }

}